home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 1997 April to September / Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso / products / Hyperion / src / drv_toshiba.c < prev    next >
C/C++ Source or Header  |  1997-02-26  |  999b  |  59 lines

  1. /*
  2.  * @(#)drv_toshiba.c    1.5    2/24/94
  3.  *
  4.  * Vendor-specific drive control routines for Toshiba XM-3401 series.
  5.  */
  6. static char *ident = "@(#)drv_toshiba.c    1.5 2/24/94";
  7.  
  8. #include <stdio.h>
  9. #include <errno.h>
  10. #include "struct.h"
  11.  
  12. #define    SCMD_TOSH_EJECT        0xc4
  13.  
  14. static int    tosh_init(), tosh_eject();
  15. int        wm_scsi2_get_volume(), wm_scsi2_set_volume();
  16.  
  17. struct wm_drive toshiba_proto = {
  18.     -1,            /* fd */
  19.     "Toshiba",        /* vendor */
  20.     "",            /* model */
  21.     NULL,            /* aux */
  22.     NULL,            /* daux */
  23.  
  24.     tosh_init,        /* functions... */
  25.     gen_get_trackcount,
  26.     gen_get_cdlen,
  27.     gen_get_trackinfo,
  28.     gen_get_drive_status,
  29.     wm_scsi2_get_volume,
  30.     wm_scsi2_set_volume,
  31.     gen_pause,
  32.     gen_resume,
  33.     gen_stop,
  34.     gen_play,
  35.     tosh_eject,
  36. };
  37.  
  38. /*
  39.  * Initialize the driver.
  40.  */
  41. static int
  42. tosh_init(d)
  43.     struct wm_drive    *d;
  44. {
  45.     extern int    min_volume;
  46.  
  47.     min_volume = 0;
  48. }
  49.  
  50. /*
  51.  * Send the Toshiba code to eject the CD.
  52.  */
  53. static int
  54. tosh_eject(d)
  55.     struct wm_drive *d;
  56. {
  57.     return (sendscsi(d, NULL, 0, 0, SCMD_TOSH_EJECT, 1, 0,0,0,0,0,0,0,0));
  58. }
  59.